package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
@TableName("t_record")
public class RecordBean {
    //设施记录id
    @TableId(value = "pk_recordid",type = IdType.AUTO)
    private Integer recordId;
    @TableField("r_dec")
    //报损描述
    private String recordDec;

    @TableField("r_date")
    //报损日期 默认--当天
    private LocalDate recordDate = LocalDate.now();
    @TableField("r_state")
    //状态 默认--未解决
    private String recordState = "未解决";
    @TableField(exist = false)
    //所属房间
    private RoomBean roomBean;
    //房间外键
    @TableField("fk_roomid")
    private Integer roomId;

    public RecordBean() {
    }

    public RecordBean(String recordDec, Integer roomId) {
        this.recordDec = recordDec;
        this.roomId = roomId;
    }

    public RecordBean(String recordDec, RoomBean roomBean) {
        this.recordDec = recordDec;
        this.roomBean = roomBean;
    }

    public RecordBean(String recordDec, LocalDate recordDate, String recordState, RoomBean roomBean) {
        this.recordDec = recordDec;
        this.recordDate = recordDate;
        this.recordState = recordState;
        this.roomBean = roomBean;
    }

    public RecordBean(String recordDec, LocalDate recordDate, String recordState,  Integer roomId) {
        this.recordDec = recordDec;
        this.recordDate = recordDate;
        this.recordState = recordState;
        this.roomId = roomId;
    }

    public Integer getRoomId() {
        return roomId;
    }

    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }

    public Integer getRecordId() {
        return recordId;
    }

    public void setRecordId(Integer recordId) {
        this.recordId = recordId;
    }

    public String getRecordDec() {
        return recordDec;
    }

    public void setRecordDec(String recordDec) {
        this.recordDec = recordDec;
    }

    public LocalDate getRecordDate() {
        return recordDate;
    }

    public void setRecordDate(LocalDate recordDate) {
        this.recordDate = recordDate;
    }

    public String getRecordState() {
        return recordState;
    }

    public void setRecordState(String recordState) {
        this.recordState = recordState;
    }

    public RoomBean getRoomBean() {
        return roomBean;
    }

    public void setRoomBean(RoomBean roomBean) {
        this.roomBean = roomBean;
    }

    @Override
    public String toString() {
        return "RecordBean{" +
                "recordId=" + recordId +
                ", recordDec='" + recordDec + '\'' +
                ", recordDate=" + recordDate +
                ", recordState='" + recordState + '\'' +
                ", roomBean=" + roomBean +
                ", roomId=" + roomId +
                '}';
    }
}
